<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>display</title>
    <style>
.circle{
    width: 80px;
    height: 80px;
    border: 3px red solid;
    float: left;
    border-radius: 50%;
    margin-left: 10px;
    line-height: 80px;
    text-align: center;
    margin-top: 10px;
    color: #fff;
    font-size: 2em;
    display: inline-block;
}
.circle:nth-child(2n){
    background-color: #000;
    
}

.circle:nth-child(2n+1){
    background-color: blue;
}

    </style>
</head>
<body>
    <div class="circle">1</div>
    <div class="circle">2</div>
    <div class="circle">3</div>
    <div class="circle">4</div>
    <div class="circle">5</div>
    <div class="circle">6</div>
    <div class="circle">7</div>
    <div class="circle">8</div>
    <div class="circle">9</div>
    <div class="circle">10</div>
    <div class="circle">11</div>
    <div class="circle">12</div>
    <div class="circle">13</div>
    <div class="circle">14</div>
    <div class="circle">15</div>
    <div class="circle">16</div>
    <div class="circle">17</div>
    <div class="circle">18</div>
    <div class="circle">19</div>
    <div class="circle">20</div>
    <div class="circle">21</div>
</body>
</html>